<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<script>
import admin from "./components/Admin";

export default {
  methods: {
    warning() {
      this.$Message.warning("您还未登录");
    }
  },
  mounted() {
    this.$axios({
      url: "/admin/account/islogin",
      withCredentials: true
    }).then(res => {
      console.log(res.data.code);

      if (res.data.code == "nologin") {
        this.$router.push("/login");
        this.warning();
      }
    });
  }
};
</script>

<style>
</style>
